import request from '@/utils/request'

// 查询牛棚列表
export function listShed(query) {
  return request({
    url: '/dgw/shed/list',
    method: 'get',
    params: query
  })
}

// 查询牛棚详细
export function getShed(cowShedId) {
  return request({
    url: '/dgw/shed/' + cowShedId,
    method: 'get'
  })
}

// 新增牛棚
export function addShed(data) {
  return request({
    url: '/dgw/shed',
    method: 'post',
    data: data
  })
}

// 修改牛棚
export function updateShed(data) {
  return request({
    url: '/dgw/shed',
    method: 'put',
    data: data
  })
}

// 删除牛棚
export function delShed(cowShedId) {
  return request({
    url: '/dgw/shed/' + cowShedId,
    method: 'delete'
  })
}

// 导出牛棚
export function exportShed(query) {
  return request({
    url: '/dgw/shed/export',
    method: 'get',
    params: query
  })
}